#ifndef PROGDEF_H
#define PROGDEF_H
#include "expr.h"
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <typeinfo>
using namespace std;
enum StmtType { st_Assign, st_Goto, st_Return, st_Label, st_FUNC_Call, st_StructAssign, st_None};
struct Stmt{
    virtual void member(){ }
    virtual ~Stmt(){ }
};

struct Prog{
    char name[256];
    vector<VarExpr*> formal_para;
    vector<Stmt*> p;
    map<Stmt*, string> LableSet;
};



struct AssignStmt: Stmt{
    VarExpr *e1;
    Expr *e2;
};
struct IfStmt: Stmt{
    Prop *p;
    Prog *p1, *p2;
};
struct WhileStmt:Stmt{
    Prop *p;
    Prog *p1;
};
struct AssertStmt:Stmt{
    Prop *p;
};
struct GotoStmt:Stmt{
    int type; // 1:continue, 2:break, 3:goto, 4:return
    char L[256];
    Expr *e;
};
struct LabelStmt:Stmt{
    char L[256];
};
struct CallFunStmt:Stmt{
    char fun[256];
    vector<Expr*> para;
    VarExpr* Ret;
};
#endif
